package org.example.yuaiagent.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.ai.chat.messages.MessageType;

import java.util.Date;

@Data
@NoArgsConstructor
@TableName("chat_message_record")
public class MyChatMessage {
    private String id;
    private String conversationId;
    private String message;
    public MyChatMessage(String id, String conversationId, String message) {
        this.id = id;
        this.conversationId = conversationId;
        this.message=message;
    }
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * The message type of the message.
     */
    private  MessageType messageType;

    /**
     * The content of the message.
     */
    protected  String textContent;
    private String metadata;

}
